<?php

/**
 * The DbRem class has methods removal of records from the database.
 * 
 * @author Cesar Augustus Silva <cesaraugustussilva@linuxmail.org>
 * @copyright Copyright (c) 2013, Cesar Augustus Silva
 * @license http://www.gnu.org/licenses/gpl.html GNU GPL v3.0
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <­http://www.gnu.org/licenses/>.
 */
class DbRem extends Db {

    /**
     * Removes the phones
     * 
     * @param int|array $id One or more identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function phones($id) {
        return parent::rem('phones', array('id' => $id));
    }

    /**
     * Removes the vehicle
     * 
     * @param int $id The identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function vehicle($id) {
        return parent::rem('vehicles', array('id' => $id));
    }
    
    /**
     * Removes the vehicle details
     * 
     * @param int $id The identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function vehicle_details($id) {
        return parent::rem('vehicles_details', array('id_vehicle' => $id));
    }
    
    /**
     * Removes the vehicle differentials
     * 
     * @param int $id The identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function vehicle_differentials($id) {
        return parent::rem('vehicles_differentials', array('id_vehicle' => $id));
    }

    /**
     * Removes the vehicle pictures
     * 
     * @param int|array $id One or more identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function vehicle_pictures($id) {
        return parent::rem('vehicles_pictures', array('id' => $id));
    }
    
    /**
     * Removes the product pictures
     * 
     * @param int|array $id One or more identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function products($id) {
        return parent::rem('products',array('id' => $id));
    }
    
    /**
     * Removes the product pictures
     * 
     * @param int|array $id One or more identity
     * @return boolean <b>TRUE</b> on success or <b>FALSE</b> on failure
     */
    public static function products_pictures($id) {
        return parent::rem('products_pictures',array('id' => $id));
    } 

}